<?php
$baseUrl = Yii::app()->request->baseUrl;
$prefix = "$baseUrl/files/slideshow/$name";
$first = $folder->imageFiles[0];
?>
﻿<div id="<?php echo $name; ?>" class="rs-slideshow">
    <div class="slide-container">
        <img src="<?php echo "$prefix/$first->basename"; ?>"
			 title="<?php echo $first->filename; ?>" />
		<span class="slide-caption"><?php echo $first->filename; ?></span>
    </div>
	<ol class="slides">
		<?php foreach ($folder->imageFiles as $file): ?>
			<li>
				<a href="<?php echo "$prefix/$file->basename"; ?>"
				   title="<?php echo $file->filename; ?>">
					<?php echo $file->filename; ?>
				</a>
			</li>
		<?php endforeach; ?>
	</ol>
</div>

<?php
EReallySimpleSlideshow::add("#$name", $options);
?>